<script setup>
import { useMenuStore } from "@/stores/menu";
import { StorageUtil } from '@/utils/common.js'
import { useRoute, useRouter } from "vue-router";
const router = useRouter()
const route = useRoute()
const menuStore = useMenuStore()
const { userInfo } = StorageUtil.local.get('user') || {}
const type = userInfo?.user_type
if (route.path === '/') {
  if (type == '2' || type == '3' || type == '5') {
    menuStore.setActiveIndex('9');
    menuStore.setMenuType('4');
    router.push("/teacherAssessList");
  } else if (type == '4') {
    menuStore.setActiveIndex('10');
    menuStore.setMenuType('5');
    router.push("/associationAssessList");
  } else {
    menuStore.setActiveIndex('1');
    menuStore.setMenuType('1');
    router.push("/");
  }
}

</script>

<template>
  <router-view></router-view>
</template>

<style>
@import url("./scss/index.scss");

::-webkit-scrollbar {
  scrollbar-color: #ff0000 #eaeaea;
}
::-webkit-scrollbar {
  display: none
}
</style>
